<?php
/*
 * classtest.php Created on 2013-4-24
 *
 * Created by 46673405@qq.com
 *
 */
require ("../ichees-fileupload.class.php");
$img = new icheesFileUpload;


$res = $img -> uploadFile('upload'); //文件上传
//返回样例 upfiles/files/20130425_041244_22405.rar

//$res = $img -> uploadImg('upload'); //图片上传
//返回样例 upfiles/images/20130425_043407_29554.jpg

//$res = $img -> resizeImg("upfiles/images/20130425_045103_21361.jpg",300,300,'01','_resize'); //图片缩放
//返回样例 upfiles/resize/20130425_045103_21361_resize.jpg

//$res = $img -> resizeBigImg("upfiles/images/20130425_045103_21361.jpg");
//返回样例 upfiles/large/20130425_045103_21361_large.jpg

//$res = $img -> resizeSmallImg("upfiles/images/20130425_045103_21361.jpg");
//返回样例 upfiles/small/20130425_045103_21361_small.jpg

//$res = $img -> waterMarkTxt("upfiles/large/20130425_045103_21361_large.jpg",'中文水印测试|waterMarkTest|透かしテスト',0,0,0,'14','ttf/msyh.ttf','100','200','0','60','_mark');
//返回样例 upfiles/large/20130425_045103_21361_large.jpg

//$res = $img -> waterMarkTxtFix("upfiles/large/20130425_045103_21361_large.jpg");
//返回样例 upfiles/large/20130425_045103_21361_large.jpg

//$res= $img ->waterMarkPic ("upfiles/large/20130425_045103_21361_large.jpg","upfiles/small/20130425_045103_21361_small.jpg",200,200,80,60,'_mark');
//返回样例 20130425_045103_21361_large_mark.jpg

/*
$img->waterMarkPic_markSrc = 'upfiles/small/20130425_045103_21361_small.jpg';
$img->waterMarkPic_postion = 2; //0随机 1左上 2中上 3右上 4左中 5中 6右中 7左下 8中下 9右下 默认5居中
$img->waterMarkPic_aphla = 60;
$img->waterMarkPic_quality = 60;
$img->waterMarkPic_suffix = '_mark';
*/

//$res= $img ->waterMarkPicFix ("upfiles/large/20130425_045103_21361_large.jpg");
//返回样例 20130425_045103_21361_large_mark.jpg

var_dump ($res);

?>
<form method="post" action="#" name="form" enctype="multipart/form-data">
	<input type="file" name="upload" />
    <input type="submit" />
</form>
<br />
<img src="<?php echo $res?>" />
